package com.chuangke.admin.service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chuangke.admin.dto.UserDeptRequest;
import com.chuangke.admin.entity.SysDept;
import com.chuangke.admin.entity.SysUserAuditDept;

public interface SysUserAuditDeptService extends IService<SysUserAuditDept>{

	void save(UserDeptRequest userDeptRequest) ;
	
	void remove(String userId,List<String> roleList) ;
	
	void removeByIds(List<String> ids) ;
	
	Map<String,List<SysUserAuditDept>> findAll() ;
	
	List<SysUserAuditDept> findByUserRole(String userId,String roleId) ;
	
	List<SysUserAuditDept> findByUserRole(String userId) ;
	
	List<SysUserAuditDept> findUserByRoleDept(String roleId,String deptId) ;
	
	boolean exists(String userId,String roleId,String deptId) ;
	
	/**
	 * 获取用户的机构权限，包含下级机构
	 * @param userId
	 * @return
	 */
	List<SysDept> findUserDeptWithChildren(String userId,String roleId) ;

	void saveBatchAuditRule(List<SysUserAuditDept> list);

	void removeAuditRule(LambdaQueryWrapper<SysUserAuditDept> lambdaQueryWrapper);

	void deleteByUserId(String userId);
}
